import { reactive } from "vue";

export default function useData() {
  const pageData = reactive({
    columnData: [
      {
        label: "序号",
        prop: "0",
        width: "80px",
        sortable: true
      },
      {
        label: "线路",
        prop: "1",
        width: "auto"
      },
      {
        label: "源IP",
        prop: "2",
        width: "auto"
      },
      {
        label: "源端口",
        prop: "5",
        width: "auto"
      },
      {
        label: "目的IP",
        prop: "3",
        width: "auto"
      },
      {
        label: "目的端口",
        prop: "6",
        width: "auto"
      },
      {
        label: "协议",
        prop: "4",
        width: "auto"
      },
      {
        label: "编辑时间",
        prop: "8",
        width: "auto"
      },
      {
        label: "操作",
        prop: "operation",
        width: "auto"
      }
    ]
  });
  const agrMap = new Map([
    ["0", "所有"],
    ["6", "TCP"],
    ["17", "UDP"],
    ["1", "ICMP"],
  ]);
  return {
    pageData,
    agrMap
  };
}
